// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::ConfigDelivery].
#[async_trait::async_trait]
pub trait ConfigDelivery: std::fmt::Debug + Send + Sync {
    async fn list_resource_bundles(
        &self,
        req: crate::model::ListResourceBundlesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListResourceBundlesResponse>>;

    async fn get_resource_bundle(
        &self,
        req: crate::model::GetResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ResourceBundle>>;

    async fn create_resource_bundle(
        &self,
        req: crate::model::CreateResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_resource_bundle(
        &self,
        req: crate::model::UpdateResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_resource_bundle(
        &self,
        req: crate::model::DeleteResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_fleet_packages(
        &self,
        req: crate::model::ListFleetPackagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListFleetPackagesResponse>>;

    async fn get_fleet_package(
        &self,
        req: crate::model::GetFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::FleetPackage>>;

    async fn create_fleet_package(
        &self,
        req: crate::model::CreateFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_fleet_package(
        &self,
        req: crate::model::UpdateFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_fleet_package(
        &self,
        req: crate::model::DeleteFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_releases(
        &self,
        req: crate::model::ListReleasesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReleasesResponse>>;

    async fn get_release(
        &self,
        req: crate::model::GetReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Release>>;

    async fn create_release(
        &self,
        req: crate::model::CreateReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_release(
        &self,
        req: crate::model::UpdateReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_release(
        &self,
        req: crate::model::DeleteReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_variants(
        &self,
        req: crate::model::ListVariantsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListVariantsResponse>>;

    async fn get_variant(
        &self,
        req: crate::model::GetVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Variant>>;

    async fn create_variant(
        &self,
        req: crate::model::CreateVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn update_variant(
        &self,
        req: crate::model::UpdateVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_variant(
        &self,
        req: crate::model::DeleteVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_rollouts(
        &self,
        req: crate::model::ListRolloutsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListRolloutsResponse>>;

    async fn get_rollout(
        &self,
        req: crate::model::GetRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Rollout>>;

    async fn suspend_rollout(
        &self,
        req: crate::model::SuspendRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn resume_rollout(
        &self,
        req: crate::model::ResumeRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn abort_rollout(
        &self,
        req: crate::model::AbortRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::ListLocationsResponse>>;

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::Location>>;

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy>;

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy>;
}

/// All implementations of [super::ConfigDelivery] also implement [ConfigDelivery].
#[async_trait::async_trait]
impl<T: super::ConfigDelivery> ConfigDelivery for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn list_resource_bundles(
        &self,
        req: crate::model::ListResourceBundlesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListResourceBundlesResponse>> {
        T::list_resource_bundles(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_resource_bundle(
        &self,
        req: crate::model::GetResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ResourceBundle>> {
        T::get_resource_bundle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_resource_bundle(
        &self,
        req: crate::model::CreateResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_resource_bundle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_resource_bundle(
        &self,
        req: crate::model::UpdateResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_resource_bundle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_resource_bundle(
        &self,
        req: crate::model::DeleteResourceBundleRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_resource_bundle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_fleet_packages(
        &self,
        req: crate::model::ListFleetPackagesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListFleetPackagesResponse>> {
        T::list_fleet_packages(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_fleet_package(
        &self,
        req: crate::model::GetFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::FleetPackage>> {
        T::get_fleet_package(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_fleet_package(
        &self,
        req: crate::model::CreateFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_fleet_package(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_fleet_package(
        &self,
        req: crate::model::UpdateFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_fleet_package(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_fleet_package(
        &self,
        req: crate::model::DeleteFleetPackageRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_fleet_package(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_releases(
        &self,
        req: crate::model::ListReleasesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListReleasesResponse>> {
        T::list_releases(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_release(
        &self,
        req: crate::model::GetReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Release>> {
        T::get_release(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_release(
        &self,
        req: crate::model::CreateReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_release(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_release(
        &self,
        req: crate::model::UpdateReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_release(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_release(
        &self,
        req: crate::model::DeleteReleaseRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_release(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_variants(
        &self,
        req: crate::model::ListVariantsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListVariantsResponse>> {
        T::list_variants(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_variant(
        &self,
        req: crate::model::GetVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Variant>> {
        T::get_variant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_variant(
        &self,
        req: crate::model::CreateVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::create_variant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_variant(
        &self,
        req: crate::model::UpdateVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::update_variant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_variant(
        &self,
        req: crate::model::DeleteVariantRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::delete_variant(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_rollouts(
        &self,
        req: crate::model::ListRolloutsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListRolloutsResponse>> {
        T::list_rollouts(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_rollout(
        &self,
        req: crate::model::GetRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Rollout>> {
        T::get_rollout(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn suspend_rollout(
        &self,
        req: crate::model::SuspendRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::suspend_rollout(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn resume_rollout(
        &self,
        req: crate::model::ResumeRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::resume_rollout(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn abort_rollout(
        &self,
        req: crate::model::AbortRolloutRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::abort_rollout(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::ListLocationsResponse>> {
        T::list_locations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::Location>> {
        T::get_location(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        T::list_operations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::cancel_operation(self, req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        T::get_polling_error_policy(self, options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        T::get_polling_backoff_policy(self, options)
    }
}
